# Set the appropriate compiler path to PATH when doing cross compilation.
# Suggestion: add these two lines to your ~/.bash_profile
#    PATH=$PATH:/sw/pub/xtools.ppc-linux/bin/:/opt/gcc-4.3/bin/
#    export PATH
# In this case, /sw/pub/xtools.ppc-linux/bin/    /opt/gcc-4.3/bin/  is our appropriate compiler path.

#Selects the operation system that will run the sdk
#Optional parameter: linux(default) vxworks
ifndef targetbase
export targetbase = linux
endif

#Specify which chip's API should be compiled
#Single chip optional parameter: greatbelt, goldengate, duet2, tsingma, tsingma_mx, arctic
#Multi-chips: all chips(single chip optional parameter) that need to be compiled
#For example, include tsingma and tsingma_mx: set CHIPNAME=tsingma tsingma_mx
ifndef CHIPNAME
#export CHIPNAME = arctic
export CHIPNAME = tsingma
endif

#Selects the version is the release version or debug version
#Optional parameter: r(release) or d(debug)
#The difference between the version of r and d is that
#the r version does not contain the debug information of sdk
ifndef VER
export VER = d
endif

#The cross compile toolchain perfix, including base path
#For example: mipsel-linux-,powerpc-linux-gun-,aarch64-linux-gnu-
ifndef CROSS_COMPILE
export CROSS_COMPILE = aarch64-linux-gnu-
endif

#Selects the types of CPU which the sdk will work on.
#Optional parameter: powerpc,mips,x86,arm,arm64
ifndef ARCH
export ARCH = arm64
endif

#Specify cpu info
#For example: i686,ppc_82xx,ls2f,freescale
ifndef CPU
export CPU = arm
endif

#Selects the platform that the SDK will run on
#Optional parameter: linux-board or vxworks-board
ifndef BOARD
export BOARD = linux-board
endif

#Specify use kernel mode SDK or user mode sdk, default is user mode.
#If you want to compile kernel mode, LINUX_LK = TRUE
#This option has no meaning in vxworks.
#Optional parameter: TRUE or FALSE
ifndef LINUX_LK
export LINUX_LK = FALSE
endif

#Specify 64 bits or 32 bits sdk
#Optional parameter: TRUE or FALSE
ifndef M64
export M64 = TRUE 
endif

####################### build path and flags ##################
#Specify the code path for SDK. This option is only used when compiling the kernel mode SDK.
#Compile the kernel when you need to use system kernel source tree compiler environment to compile SDK code,
#"M" used to specify the code path.
#This option has no meaning in linux user mode and vxworks.
ifndef M
#export M =
endif

#Specify the kbuild directory of operation system. This option is used to compile kernel mode and dal driver in user mode.
#This option has no meaning in vxworks.
ifndef KDIR
export KDIR = /home/guhai/test/git/plat-wh/cldk-v20.11/output/linux-4.19
endif

#Specify the storage path of the object file and executable file generated by sdk compilation
ifndef BLD_DIR
export BLD_DIR = $(CURDIR)/build.$(CPU).$(VER)
endif
ifndef OBJ_BASE_DIR
export OBJ_BASE_DIR = $(BLD_DIR)/obj.$(BOARD)
endif
ifndef LIB_DIR
export LIB_DIR = $(BLD_DIR)/lib.$(BOARD)
endif
ifndef BIN_DIR
export BIN_DIR = $(BLD_DIR)/bin.$(BOARD)
endif

#Sdk code compile option
#If you want enable Warmboot function, should -DWARMBOOT
ifndef CTC_CFLAGS
export CTC_CFLAGS = -DWARMBOOT -DCTC_PKT_RX_CB_LIST -Wall -Werror -g
endif
####################### other config ##################
#Select to complie sdk with mchip simulation or not
#Optional parameter: yes or no
ifndef MCHIP_SIM
export MCHIP_SIM = no
endif

#Select to complie sdk include phy driver or not
#Optional parameter: yes or no
ifndef CTC_PHY_EN
export CTC_PHY_EN = no
endif

#Select to compile sdk include cli: yes or no
ifndef CTC_CLI_EN
export CTC_CLI_EN = yes
endif

#Select to compile sdk into a complete library, or multiple independent libraries
#All sdk code exclude app directory compile to a complete library
#Optional parameter: yes or no
ifndef ONE_LIB
export ONE_LIB = no
endif

#Select to compile sdk into dynamic library, or static library
#Optional parameter: yes(dynamic) no(static)
ifndef SO_LIB
export SO_LIB = yes 
endif

#Select sdb mode
#SDB_MODE: 0-Disable, 1-Normal SDB, 2-With timestamp
ifndef SDB_MODE
export SDB_MODE = 1
endif

#Specify make arguments
#For example, use 5 jobs to compile sdk:set CTC_MAKE=make -j5
ifndef CTC_MAKE
export CTC_MAKE = make -j15
endif

